When debugging code, a debugger steps through the code to be debugged by executing (typically via a runtime environment) the code and pausing the execution of the code at the end of each “step”. This pausing can allow analysis of the runtime environment, and it can also allow other actions such as user input to provide direction via user input.
Debuggers can step through asynchronous code (e.g., asynchronous workflows in the Visual F# language and asynchronous methods in the Visual C#® and Visual Basic® languages), such as an “asynchronous wait” operator in target code, which triggers an asynchronous wait operation. An asynchronous wait operation suspends execution of the target code (e.g., by signing up a callback to be invoked upon the completion of some asynchronous operation) and then returns to the target code's caller. Later, (e.g., when the callback is invoked) processing of the asynchronous operation is continued in the target code. Execution of such an asynchronous wait operation causes a typical debugger to follow the physical execution and continue stepping in the caller.